<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<html>
<style type="text/css">
	columnleft {
		margin-left: 1px;
		margin-top: 15px;
		width: 245px;
		float: left;
	}
	
	columnMiddle {
		height:500px;
		margin-left: 250px;
		min-height: 500px;
		padding: 5px;
		width: 99%;
		overflow:visible;
		margin-top: 16px;
	}
	ul.list_subsub_kisa li a{
		color:#6DB1E7;
		display:block;
		height:25px;
		line-height:25px;
		list-style-image:none;
		list-style-position:outside;
		list-style-type:none;
		margin:0;
		padding:0 0 1px 25px;
		text-decoration:underline;
		width:280px;	
	}
	ul.list_subsub_kisa li a:hover {
		color:#F85F3B;
		text-decoration:none;
	}
</style>
<head>
<title>Login Successful</title>
<!-- <link href="../css/style.css" rel="stylesheet" type="text/css" />   -->
</head>
<body>
<f:view>
	<h:form>
	<h4 align="center">Main User Screen</h4>
	<table>
		<tr>
			<!--<td>
				<div class="columnleft"><a4j:include  viewId="simpleTree.jsp" /></div>
			</td> -->
			<td>
				<ul class="list_subsub_kisa">
				<li>
					<a href="createNewTelephoneBook.jsf" title="YeniTelefonDefteriOlustur">Yeni Telefon Defteri Olustur</a>
				</li>
				<li>
					<a href="createNewTelephoneRecord.jsf" title="YeniTelefonKaydiOlustur">Telefon Kaydet</a>
				</li>
				<li>
					<a href="mainUserForm.jsf" title="KullaniciAnaSayfa">Kullanici Ana Sayfasi</a>
				</li>
				</ul>
			</td>
			<td>
				<div class="columnMiddle"><rich:spacer width="1" height="50" />
					<rich:panel style="width:720px;background-color: #ebf3fd;">
						<f:facet name="header">
							<h:outputText value="Telephone Book"></h:outputText>
						</f:facet>
						<h:panelGrid columns="1" style="width:500px;">
			
							<rich:dataTable id="telephoneBookListTable" value="#{telephoneBookController.telephoneBooks}"
											style="margin-left:0;" var="telephoneBook" rows="5" width="480"
											binding="#{telephoneBookController.telephoneBooksTable}">
											
											<f:facet name="header">
						                		<h:outputText value="List of Telephone Books" />
						        			</f:facet>
							
											<rich:column>
								                <f:facet name="header">
								                	<h:outputText value="Telefon Defteri No" />						               		
								                </f:facet>
								                <h:outputText value="#{telephoneBook.id}"/>
						       	 			</rich:column>	
											
											<rich:column>
								                <f:facet name="header">
								                	<h:outputText value="Telefon Defteri Adi" />						               		
								                </f:facet>
								                <h:outputText value="#{telephoneBook.telephoneBookName}"/>
						       	 			</rich:column>
						       	 			
						       	 			<rich:column>
								                <f:facet name="header">
								                	<h:outputText value="Telefon Defteri Sahibi" />						               		
								                </f:facet>
								                <h:outputText value="#{telephoneBook.user.firstName}"/>
						       	 			</rich:column>
						       	 			
						       	 			<rich:column>
												<f:facet name="header">
													<h:outputText value="Duzenle" />
												</f:facet>
												<h:commandButton value="Duzenle"
													image="/images/view.gif"
													action="#{telephoneBookController.editTelephoneBook}"/>
											</rich:column>
											
											<rich:column>
												<f:facet name="header">
													<h:outputText value="Telefonlari Listele" />
												</f:facet>
												<h:commandButton value="Telefonlari Listele"
													image="/images/linkTo.gif"
													action="#{telephoneBookController.listTelephones}"/>
											</rich:column>
											
											<!-- 
											<rich:column>
												<f:facet name="header">
													<h:outputText value="Sil" />
												</f:facet>
												<h:commandButton value="Sil" image="/images/toDelete.gif"
													action="#{telephoneBookController.showDeleteConfirmationPopup}"/>
											</rich:column>
											 -->
											 
											 
							
							</rich:dataTable>



						</h:panelGrid>
					</rich:panel>
				</div>
			</td>
		</tr>
	</table>
	</h:form>
</f:view>
</body>
</html>